namespace BanckUtil
{
    class Account
    {
        private string id;
        private double money { get; set; }
        private string pwd;

        public Account(string id, string pwd)
        {
            this.id = id;
            this.pwd = pwd;
            this.money = 0D;
        }

        public string GetId()
        {
            return this.id;
        }

        public bool IsMatch(string pwd)
        {
            return pwd.Equals(pwd);
        }

        public void SaveMoney(double count)
        {
            money += count;
        }

        public void WithDraw(double count)
        {
            money -= count;
        }

        public override string ToString()
        {
            return $"Account -> id: {id}, pwd: {pwd}, balance {money}";
        }
    }
}